<div class="content">
    <div class="wrap">
        <<?php echo $this->action->id == 'view' ? 'h1' : 'h2'?>>
        <a href="<?php echo $data->url?>" title="<?php echo $data->nameEncode?>"><?php echo $data->name?></a> 
        <span class="underline"></span>
        </<?php echo $this->action->id == 'view' ? 'h1' : 'h2'?>>

        <div class="meta">
            <div class="meta-wrap">
                <i class="icon-time"></i>
                <?php echo $data->createdTime?>
            </div>
            <div class="meta-wrap">
                <i class="icon-user"></i>
                Bởi: <?php echo $data->userName?>
            </div>
            <?php if($data->fb_comment_count):?>
                <div class="meta-wrap">
                    <i class="icon-comment"></i>
                    <?php echo $data->fb_comment_count?> Comment
                </div>
                <?php endif?>

            <?php if($this->userInfo && $this->userInfo->isMod):?>    
                <?php if($data->reviewed):?>
                    <div class="meta-wrap">
                        <i class="icon-smile"></i>
                        Reviewed
                    </div>
                    <?php endif?>
                <?php if($data->fb_posted):?>
                    <div class="meta-wrap">
                        <i class="icon-facebook"></i>
                        posted: <?php echo date('d-m-Y', strtotime($data->fb_posted))?>
                    </div>
                    <?php endif?>

                <?php if($data->fb_posted):?>
                    <div class="meta-wrap">
                        <i class="icon-edit"></i>
                        <a target="_blank" href="<?php echo $data->urlUpdate?>">Edit</a>
                    </div>
                    <?php endif?>
                <?php endif?>
        </div>

        <div class="box">

            <?php $this->renderPartial('//hehe/web/joke/_manage', array('model' => $data))?>

            <div class="joke-container">
                <?php if($data->image):?>
                <div class="joke-img">
                    <a href="<?php echo $data->url?>" title="<?php echo $data->nameEncode?>">
                        <img alt="<?php echo $data->nameEncode?>" src="<?php echo $data->imageUrl?>"/>
                    </a>
                </div>
                <?php endif?>
                
                <div class="joke-desc"<?php if(!$data->image):?> style="margin-left: 0;"<?php endif?>>
                    <blockquote class="top bottom-2"><?php echo $data->desc?></blockquote>
                </div>
                
                <div class="joke-content clearfix">
                <?php echo $data->content?>
                </div>
                
            </div>

            <?php $this->renderPartial('//hehe/web/joke/_manage', array('model' => $data))?>

        </div>
    </div>
</div> 
